<?php

class video_model extends FlexiGrid_Model {

    function __construct()
    {
        parent::__construct();
        
    }
    function getToken($q=""){
        $where=array("Delete"=>null,"Status"=>"Public");
        $this->db->like('Title', $q); 
        $query=$this->db->get_where('tbl_video', $where,10,0); 
        return $query->result();
    }
    function get($ID){
        $where=array("ID"=>$ID,"Status"=>"Public","Delete"=>null,);
        $query=$this->db->get_where('tbl_video', $where); 
        return $query->result();
    }
    function gets(){
        $where=array("Delete"=>null,"Status"=>"Public");
        $query=$this->db
                ->where($where)
                ->order_by("Insert","DESC")
                ->get('tbl_video',4); 
        return $query->result();
    }
    
    
}
?>
